
package org.bridgen.lang.semantics.ast;
import java.util.*;


public class InsertBridgeStart extends InsertionRule implements Cloneable {
    public void flushCache() {
        super.flushCache();
    }
     @SuppressWarnings({"unchecked", "cast"})  public InsertBridgeStart clone() throws CloneNotSupportedException {
        InsertBridgeStart node = (InsertBridgeStart)super.clone();
        node.in$Circle(false);
        node.is$Final(false);
    return node;
    }
     @SuppressWarnings({"unchecked", "cast"})  public InsertBridgeStart copy() {
      try {
          InsertBridgeStart node = (InsertBridgeStart)clone();
          if(children != null) node.children = (ASTNode[])children.clone();
          return node;
      } catch (CloneNotSupportedException e) {
      }
      System.err.println("Error: Could not clone node of type " + getClass().getName() + "!");
      return null;
    }
     @SuppressWarnings({"unchecked", "cast"})  public InsertBridgeStart fullCopy() {
        InsertBridgeStart res = (InsertBridgeStart)copy();
        for(int i = 0; i < getNumChildNoTransform(); i++) {
          ASTNode node = getChildNoTransform(i);
          if(node != null) node = node.fullCopy();
          res.setChild(node, i);
        }
        return res;
    }
    // Declared in PrettyPrint.jrag at line 186

    
    
    public void pp(StringBuffer buf) {
    	buf.append("insert bridge-start ");
    	getRelation().pp(buf);
    	buf.append(" ");
    	getPatternUse().pp(buf);
    }

    // Declared in bridgit.ast at line 3
    // Declared in bridgit.ast line 124

    public InsertBridgeStart() {
        super();


    }

    // Declared in bridgit.ast at line 10


    // Declared in bridgit.ast line 124
    public InsertBridgeStart(Relation p0, PatternUse p1) {
        setChild(p0, 0);
        setChild(p1, 1);
    }

    // Declared in bridgit.ast at line 15


  protected int numChildren() {
    return 2;
  }

    // Declared in bridgit.ast at line 18

  public boolean mayHaveRewrite() { return false; }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 123
    public void setRelation(Relation node) {
        setChild(node, 0);
    }

    // Declared in bridgit.ast at line 5

    public Relation getRelation() {
        return (Relation)getChild(0);
    }

    // Declared in bridgit.ast at line 9


    public Relation getRelationNoTransform() {
        return (Relation)getChildNoTransform(0);
    }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 123
    public void setPatternUse(PatternUse node) {
        setChild(node, 1);
    }

    // Declared in bridgit.ast at line 5

    public PatternUse getPatternUse() {
        return (PatternUse)getChild(1);
    }

    // Declared in bridgit.ast at line 9


    public PatternUse getPatternUseNoTransform() {
        return (PatternUse)getChildNoTransform(1);
    }

public ASTNode rewriteTo() {
    return super.rewriteTo();
}

}
